﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace test1
{
    class Program
    {
        static DateTime GetTheDate()
        {
            DateTime dt = new DateTime();
            Console.WriteLine("Please inout your birth date");
            try
            {
                dt = Convert.ToDateTime(Console.ReadLine());
            }
            catch (FormatException)
            {
                Console.WriteLine("You entered ivalid data, please try again");
                GetTheDate();
            }
            return dt;
        }

        static void CountBirthday(DateTime dateT)
        {
            DateTime dt = dateT;
            string[] array = new string[100];
            int Monday = 0, Tuesday = 0, Wednesday = 0, Thurthday = 0, Friday = 0, Saturday = 0, Sunday = 0;
            for (int i = 0; i < 100; i++)
            {
                DateTime newdate = dt.AddYears(i);
                array[i] = newdate.DayOfWeek.ToString();
            }
            for (int i = 0; i <= array.Length - 1; i++)
            {
                switch (array[i])
                {
                    case "Sunday":
                        Sunday++;
                        break;
                    case "Monday":
                        Monday++;
                        break;
                    case "Tuesday":
                        Tuesday++;
                        break;
                    case "Wednesday":
                        Wednesday++;
                        break;
                    case "Thursday":
                        Thurthday++;
                        break;
                    case "Friday":
                        Friday++;
                        break;
                    case "Saturday":
                        Saturday++;
                        break;
                }
            }
            Console.WriteLine(" Monady: {0}, Tuesday: {1}, Wednesday: {2}, Thurthday: {3}, Friday: {4}, Saturday: {5}, Sunday: {6}. ", Monday, Tuesday, Wednesday, Thurthday, Friday, Saturday, Sunday);
        }

        static void Main(string[] args)
        {
            CountBirthday(GetTheDate());
            Console.ReadKey();    
        }
    }
}
